<html>
<head><meta charset="utf-8"><title>how to make cargo fetch a specific version? · general · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/index.html">general</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/how.20to.20make.20cargo.20fetch.20a.20specific.20version.3F.html">how to make cargo fetch a specific version?</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="207200342"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/how%20to%20make%20cargo%20fetch%20a%20specific%20version%3F/near/207200342" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/how.20to.20make.20cargo.20fetch.20a.20specific.20version.3F.html#207200342">(Aug 17 2020 at 21:41)</a>:</h4>
<p>I need cargo to give me the source folder for a specific version of a crate. I don't want to <em>use</em> that as a dependency, I just want to edit those files and release a patch to an old version of a project that I don't have a git tag for.</p>
<p>Is there a magic cargo command to make it just grab the source from <a href="http://crates.io">crates.io</a> for, in this case, <code>tinyvec-0.3.3</code> ?</p>
<p>cc <span class="user-mention" data-user-id="116122">@simulacrum</span></p>



<a name="207200391"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/how%20to%20make%20cargo%20fetch%20a%20specific%20version%3F/near/207200391" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/how.20to.20make.20cargo.20fetch.20a.20specific.20version.3F.html#207200391">(Aug 17 2020 at 21:42)</a>:</h4>
<p>yeah</p>



<a name="207200488"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/how%20to%20make%20cargo%20fetch%20a%20specific%20version%3F/near/207200488" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/how.20to.20make.20cargo.20fetch.20a.20specific.20version.3F.html#207200488">(Aug 17 2020 at 21:43)</a>:</h4>
<p>not cargo though</p>



<a name="207200493"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/how%20to%20make%20cargo%20fetch%20a%20specific%20version%3F/near/207200493" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/how.20to.20make.20cargo.20fetch.20a.20specific.20version.3F.html#207200493">(Aug 17 2020 at 21:43)</a>:</h4>
<p>let me go track the script down</p>



<a name="207200586"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/how%20to%20make%20cargo%20fetch%20a%20specific%20version%3F/near/207200586" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/how.20to.20make.20cargo.20fetch.20a.20specific.20version.3F.html#207200586">(Aug 17 2020 at 21:44)</a>:</h4>
<p>okay</p>



<a name="207200680"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/how%20to%20make%20cargo%20fetch%20a%20specific%20version%3F/near/207200680" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/how.20to.20make.20cargo.20fetch.20a.20specific.20version.3F.html#207200680">(Aug 17 2020 at 21:45)</a>:</h4>
<p><span class="user-mention" data-user-id="224471">@Lokathor</span> </p>
<div class="codehilite"><pre><span></span><code>$ curl -sSL -o - https://crates.io/api/v1/crates/tinyvec/0.3.3/download | tar tzf -
tinyvec-0.3.3/.cargo_vcs_info.json
tinyvec-0.3.3/.gitignore
tinyvec-0.3.3/.travis.yml
tinyvec-0.3.3/Cargo.toml
tinyvec-0.3.3/Cargo.toml.orig
tinyvec-0.3.3/LICENSE-ZLIB.md
tinyvec-0.3.3/README.md
tinyvec-0.3.3/appveyor.yml
tinyvec-0.3.3/benches/macros.rs
tinyvec-0.3.3/rustfmt.toml
tinyvec-0.3.3/src/array.rs
tinyvec-0.3.3/src/arrayvec.rs
tinyvec-0.3.3/src/lib.rs
tinyvec-0.3.3/src/tinyvec.rs
tinyvec-0.3.3/tests/arrayvec.rs
tinyvec-0.3.3/tests/tinyvec.rs
</code></pre></div>



<a name="207200746"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/how%20to%20make%20cargo%20fetch%20a%20specific%20version%3F/near/207200746" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/how.20to.20make.20cargo.20fetch.20a.20specific.20version.3F.html#207200746">(Aug 17 2020 at 21:46)</a>:</h4>
<p>(you can obviously safe that tarball and do whatever with it)</p>



<a name="207201238"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/how%20to%20make%20cargo%20fetch%20a%20specific%20version%3F/near/207201238" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/how.20to.20make.20cargo.20fetch.20a.20specific.20version.3F.html#207201238">(Aug 17 2020 at 21:52)</a>:</h4>
<p>(I think we link a script somewhere in the forge maybe, it's probably <a href="https://gist.github.com/lqd/4a8af10389d10840d90655c109df5eac">https://gist.github.com/lqd/4a8af10389d10840d90655c109df5eac</a> but it does the same thing of course)</p>



<a name="207202270"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/how%20to%20make%20cargo%20fetch%20a%20specific%20version%3F/near/207202270" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/how.20to.20make.20cargo.20fetch.20a.20specific.20version.3F.html#207202270">(Aug 17 2020 at 22:05)</a>:</h4>
<p>/me would love to see a <code>cargo download</code> that grabbed the <code>.crate</code> file.</p>



<a name="207210456"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/how%20to%20make%20cargo%20fetch%20a%20specific%20version%3F/near/207210456" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/how.20to.20make.20cargo.20fetch.20a.20specific.20version.3F.html#207210456">(Aug 17 2020 at 23:55)</a>:</h4>
<p>See also <a href="https://crates.io/crates/cargo-open">https://crates.io/crates/cargo-open</a></p>



<a name="207210472"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/how%20to%20make%20cargo%20fetch%20a%20specific%20version%3F/near/207210472" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/how.20to.20make.20cargo.20fetch.20a.20specific.20version.3F.html#207210472">(Aug 17 2020 at 23:55)</a>:</h4>
<p>And <a href="https://crates.io/crates/cargo-download">https://crates.io/crates/cargo-download</a></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>